﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using NetWing.Common.Data;
using NetWing.Common.Data.SqlServer;

namespace NetWing.BPM.Admin
{
    public partial class tools : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SqlDataReader dr = SqlEasy.ExecuteDataReader("SELECT DISTINCT homeNo  FROM         NetWing_Member_File_Info  ");
            string homeno = "";
            while (dr.Read())
            {
                homeno = dr["homeno"].ToString();
                SqlDataReader dr2 = SqlEasy.ExecuteDataReader("select * from NetWing_Member_File_Info where homeno='"+homeno+"'");
                int aaa = 1;
                while (dr2.Read())
                {
                    SqlEasy.ExecuteNonQuery("update NetWing_Member_File_Info set personalnumber='"+dr2["homeno"].ToString()+""+"0"+""+aaa+"'  where keyid="+dr2["keyid"]+" ");
                    aaa = aaa + 1;
                }
            }


        }
    }
}